/**
 * 
 */
package com.wskj.library.employer.controller;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.wskj.library.service.EmployerService;
import com.wskj.library.service.impl.EmployerServiceImpl;

/**
 * @author 胡洋
 * @describe  批量删除员工的信息 
 * @Date 2018年3月26日下午5:56:15
 * @version 1.0
 */
@WebServlet(urlPatterns="/employer/deleteAll.do")
public class DeleteAllEmployers extends HttpServlet {
	EmployerService emService = new EmployerServiceImpl();
	
	
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String ids = req.getParameter("ids");		
		String[] id = ids.split(",");
		//批量删除员工的信息 列表 ....
		boolean result=emService.deleteAllEmployer(id);
		
		resp.sendRedirect(req.getContextPath()+"/employer/list.do");		
	}
	
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doGet(req, resp);
	}
}
